Telegram Group & Telegram Channel
В одну строку - итератор

Вы уже знаете, как писать многие крутые штуки в одну строчку. Но можно ускорить работу кода, используя итераторы.

Итератор - объект, который хранит начало, конец, текущий элемент и правило преобразований. В итоге мы можем получать только новые значения.

Преимущество в том, что итераторы потребляют намного меньше памяти, чем списки и кортежи.

Вы уже точно знаете один итератор и даже пользуетесь им - range().

А есть еще один очень полезный - map(). Он принимает два аргумента, функцию для задания правила преобразования и что-то, что требуется преобразовать.



tg-me.com/itpythons/29
Create:
Last Update:

В одну строку - итератор

Вы уже знаете, как писать многие крутые штуки в одну строчку. Но можно ускорить работу кода, используя итераторы.

Итератор - объект, который хранит начало, конец, текущий элемент и правило преобразований. В итоге мы можем получать только новые значения.

Преимущество в том, что итераторы потребляют намного меньше памяти, чем списки и кортежи.

Вы уже точно знаете один итератор и даже пользуетесь им - range().

А есть еще один очень полезный - map(). Он принимает два аргумента, функцию для задания правила преобразования и что-то, что требуется преобразовать.

BY Python College | СФЕРА IT




Share with your friend now:
tg-me.com/itpythons/29

View MORE
Open in Telegram


Python College | СФЕРА IT Telegram | DID YOU KNOW?

Date: |

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

Python College | СФЕРА IT from sa


Telegram Python College | СФЕРА IT
FROM USA